/**
 * 超级管理员相关类型定义
 * 创建时间：2025-09-17
 * 作者：开发团队
 * 目的：定义超级管理员模块数据类型
 */

import type { AccountStatus } from './common'

// 管理员接口
export interface Admin {
  id: number
  username: string
  name: string
  phone?: string
  campus_id?: number
  campus_name?: string
  status: AccountStatus
  last_login?: string
  created_at: string
}

// 管理员请求接口
export interface AdminRequest {
  username: string
  password?: string
  name: string
  phone?: string
  campus_id?: number
  status: AccountStatus
}

// 院区接口
export interface Campus {
  id: number
  name: string
  address?: string
  contact_person?: string
  contact_phone?: string
  created_at: string
  updated_at: string
}

// 院区请求接口
export interface CampusRequest {
  name: string
  address?: string
  contact_person?: string
  contact_phone?: string
}

// 数据包接口
export interface DataPackage {
  id: number
  content_types: string[]
  file_size: number
  encryption_status: string
  download_count: number
  created_at: string
  download_url?: string
}

// 数据包请求接口
export interface DataPackageRequest {
  content_types: string[]
  encryption?: boolean
}

// 系统状态接口
export interface SystemStatus {
  server: {
    cpu_usage: number
    memory_usage: number
    disk_usage: number
    uptime: number
  }
  database: {
    status: string
    connections: number
    size: number
  }
  services: Array<{
    name: string
    status: string
    last_check: string
  }>
}